<?php
declare (strict_types = 1);

namespace app\common\validate\system;

use think\Validate;

class UserValidate extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名' =>  ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
        'username' => ['require','length'=>'5,32'],
        'password' => ['require','length'=>'5,32']
    ];

    /**
     * 定义错误信息
     * 格式：'字段名.规则名' =>  '错误信息'
     *
     * @var array
     */
    protected $message = [];
    protected $scene =[
        'login' => ['username','password'],
        'edit'=>['username'],

    ];
}
